<!--suppress ALL -->
<script lang="ts">
export default {
  name: "OperateMethodCodeMirror"
}
</script>

<template>
  <el-input v-model="dataState.formData.listJson" :autosize="{ minRows: 30, maxRows: 30 }" :readonly="true"
            type="textarea"/>
</template>

<script lang="ts" setup>
import {onMounted, reactive, toRefs, ref} from "vue";


import {DeviceModelItem, ScriptMethod} from "@/api/repo/comp/local/types";


const emit = defineEmits(['update']);// 定义组件的事件通知

/**
 * 对外声明接口：父页面可以调用它
 */
defineExpose({initData});

// 数据状态：定义
let dataState = reactive({
  // 表单数据
  formData: {
    listJson: ''
  },
});


/**
 * 刷新表单
 */
function initData(entity: any) {
  dataState.formData.listJson = JSON.stringify(entity.templateParam, null, 50);
}

/**
 * 响应页面安装：页面的初始化工作
 */
onMounted(() => {
});

</script>
